#ifndef CSV_DECODER_H
#define CSV_DECODER_H

#include <QObject>
#include <QByteArray>
#include <QString>
#include <QRegExp>
#include "pointdata.h"

class CsvDecoder : public QObject
{
	Q_OBJECT

public:
	CsvDecoder(void);
	~CsvDecoder();

private:
	void procLine(QByteArray line);
	void procElem(QString elem);

signals:
	void recv_a_point(PointData point);

public slots:
	void on_recv_data(QByteArray data);

private:
	QByteArray m_line_buffer;
	QRegExp *m_pattern;
};

#endif